
<!--页面主要内容-->
<main class="lyear-layout-content">

  <div class="container-fluid p-t-15">

    <div class="row">
      <div class="col-lg-12">
        <div class="card">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">用户管理</a>
            <a><cite>积分消费记录</cite></a>
          </span>
          <div class="card-body">
            {if condition="$flag"}
            <div class="callout callout-info mb-3">已查询到用户
              <span style="color: blue">{$user.nickname}</span>积分消费记录，共
              <span style="color: blue;">{$num}</span>条，剩余积分<span style="color: blue;">{$user.point}</span></div>
            {/if}

            <div class="table-responsive">
              <table class="table table-bordered">
                <thead>
                  <tr>
                    <th>编号</th>
                    <th>用户名</th>
                    <th>内容</th>
                    <th>时间</th>
                    <th>消费属性</th>
                  </tr>
                </thead>
                <tbody>
                  {foreach $recordList as $key => $item}
                  <tr>
                    <td>{$key+1}</td>
                    <td>{$item.user.nickname}</td>
                    <td>{$item.content}</td>
                    <td>{$item.createtime}</td>
                    <td>
                      {if condition="$item.state==1"}
                      <span class="layui-badge">发布</span>
                      {elseif condition="$item.state==2"}
                      <span class="layui-badge layui-bg-orange">采纳</span>
                      {elseif condition="$item.state==3"}
                      <span class="layui-badge layui-bg-green">充值</span>
                      {elseif condition="$item.state==4"}
                      <span class="layui-badge layui-bg-blue">签到</span>
                      {elseif condition="$item.state==5"}
                      <span class="layui-badge layui-bg-cyan">下商品订单</span>
                      {elseif condition="$item.state==6"}
                      <span class="layui-badge layui-bg-cyan">下预约订单</span>
                      {elseif condition="$item.state==-1"}
                      <span class="layui-badge layui-bg-gray">退款</span>
                      {/if}
                    </td>
                  </tr>
                  {/foreach}
                </tbody>
              </table>
            </div>
            
            <!-- 分页 -->
            {$recordList->render()}
          </div>
        </div>
      </div>

    </div>

  </div>

</main>
<!--End 页面主要内容-->